<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/* Author: Jorge Torres
 * Description: Login controller class
 */
class Cart extends CI_Controller{
    
    function __construct(){
        parent::__construct();
    }
    
    public function index($msg = NULL){
        redirect('home');
    }
    
    public function add_cart_item(){
    	$data = array(	
    		'market_item_id' => $this->input->post('market_item_id'),
    		'quantity' => $this->input->post('quantity'),
    		'market_item_name' =>$this->input->post('market_item_name'),
    		'market_item_price' => $this->input->post('market_item_price')
    	);
    	$this->cart->insert($data);
    	$this->output->set_header('Content-Type: application/json; charset=utf-8');
    	$this->output->set_output(json_encode(array('status'=>'success','gelen_veri'=>$data)));
    }
}
?>